<style lang="scss" scoped>
.centerPopBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    .image {
        height: 100rpx;
        width: 100rpx;
        border-radius: 50%;
        margin-top: 10px;
    }
    .text {
        color: #999;
        font-size: 28rpx;
    }
}
</style>
<template>
    <view class="wodecontentbgview flex-column">
        <view class="header">
            <view class="fiexdheader" :style="returnstryle(styleColorNum)">
                <view class="positionBox">
                    <image
                        @tap="clickwodelistBtn(1)"
                        class="listImageIcon-2"
                        v-if="showWodeshezhi"
                        src="https://mcdn.chatgk.com/xcx/static/images/wode/wodeshezhi.png"
                    ></image>
                </view>
            </view>
            <view :style="{ height: statusHeight + 5 + 'px' }"></view>

            <view class="flex-row wodeheadview center-row">
                <view class="wodeheadimage-background">
                    <image
                        v-show="nologin"
                        class="wodeheadimage"
                        @tap="selectHeadImage"
                        :src="
                            myheadImage?.length == 0
                                ? 'https://mcdn.chatgk.com/xcx/static/images/wode/headimageMan.png'
                                : myheadImage
                        "
                    ></image>
                    <image
                        v-show="!nologin"
                        class="wodeheadimage"
                        src="https://mcdn.chatgk.com/xcx/static/images/wode/headimageMan.png"
                        mode=""
                    ></image>
                    <image
                        class="icon_wode_vip"
                        v-show="nologin && userInfo?.isVIP"
                        src="https://mcdn.chatgk.com/xcx/static/images/wode/icon_wode_vip.png"
                        mode="aspectFit"
                    ></image>
                </view>

                <view class="no-login" v-if="!nologin" @tap="gotologin">
                    <view class="no-login-1" v-show="!nologin">登录/注册 ></view>
                    <view class="no-login-2" v-show="!nologin">登录/注册可解锁完整功能</view>
                </view>

                <view class="flex-column" :style="userInfo && userInfo?.isVIP ? 'margin-left: 20rpx;' : ''">
                    <view class="flex-row center-row align-center" v-if="nologin" @tap="selectHeadImage">
                        <view class="wodenametitle">
                            {{ userName }}
                        </view>
                        <image
                            class="wodenameimage"
                            src="https://mcdn.chatgk.com/xcx/static/images/wode/wodejiantou.png"
                            mode="aspectFit"
                        ></image>
                    </view>
                    <view class="flex-row center-row align-center" v-if="!isShowAddrss">
                        <!-- @tap="updateinfo" -->

                        <view class="wodeareatitle">
                            {{ myAddress }}
                        </view>
                        <view v-show="nologin" class="wodegkYeartitle">{{ graduate_time }}年高考</view>
                        <!-- graduate_time -->
                    </view>
                    <view class="flex--direction text-score align-center" v-if="nologin" @tap="navscore">
                        <text>{{ isgaokao == 1 ? '高考成绩' : '平时成绩' }}</text>
                        <text style="margin: 0 20rpx">
                            {{ isgaokao == 1 ? (graduate_time != nowYear ? '-' : myScore) : myScore }}
                        </text>
                        <text>{{ userInfo ? userInfo.sgname : '' }}</text>

                        <image
                            v-if="isLoadingGk"
                            class="editscoreimage"
                            :src="
                                isgaokao == 1
                                    ? 'https://mcdn.chatgk.com/xcx/static/images/login/password.png'
                                    : 'https://mcdn.chatgk.com/xcx/static/images/wode/wodexiugai.png'
                            "
                            mode="aspectFit"
                        ></image>

                        <!-- <image  class="editscoreimage"
                        src="https://mcdn.chatgk.com/xcx/static/images/wode/wodexiugai.png"
                        mode="aspectFit"></image> -->
                    </view>
                </view>
                <image
                    @tap="clickwodelistBtn(1)"
                    style="padding: 20rpx 0"
                    class="listImageIcon"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/wodeshezhi.png"
                ></image>
            </view>

            <!-- 顶部信息 -->

            <view
                class="flex-column center-column view-vip-bg"
                :class="userInfo ? (userInfo?.isVIP ? 'view-vip-bg2' : '') : ''"
            >
                <view
                    class="flex-row space-between text-vip-28"
                    @tap="onClickGotoSeeVip"
                    :style="userInfo ? '' : 'margin: auto 0;'"
                >
                    <view class="flex-row center-row">
                        <text style="color: #fff; font-size: 28rpx; font-weight: bold">
                            {{ userInfo?.cardTypeName }}
                        </text>
                        <view v-if="userInfo" class="view-vip-line"></view>
                        <text>
                            {{
                                userInfo && userInfo?.isVIP
                                    ? '可使用8项功能服务'
                                    : userInfo
                                    ? '可使用2项功能服务'
                                    : '开通VIP,  精准选大学'
                            }}
                        </text>
                    </view>

                    <view class="flex-row center-row">
                        <text :style="'color:' + (userInfo && userInfo?.isVIP ? '#fff' : '#FF9638')">
                            {{ userInfo && userInfo?.isVIP ? '去查看' : '去开通VIP' }}
                        </text>
                        <image
                            style="width: 40rpx; height: 40rpx"
                            :src="
                                'https://mcdn.chatgk.com/xcx/static/images/wode/' +
                                (userInfo && userInfo?.isVIP ? 'right_arrow_white.png' : 'vip_arrow_yellow.png')
                            "
                            mode="aspectFit"
                        ></image>
                    </view>
                </view>

                <text class="text-vip-24" v-if="userInfo" style="margin-top: 14rpx">
                    {{
                        userInfo && userInfo?.isVIP
                            ? '会员到期日: ' + userInfo.expiretime
                            : '开通VIP精准选大学，立享8大会员特权'
                    }}
                </text>
            </view>
            <!-- <image class="wodefuncview" src="https://mcdn.chatgk.com/xcx/static/images/wode/wode_item_bg.png"
				mode="aspectFit"></image> -->
        </view>

        <!-- 工具栏 -->
        <view class="flex-row wodefuncview">
            <image
                class="wodefuncview-img"
                src="https://mcdn.chatgk.com/xcx/static/images/wode/wode_item_bg.png"
                mode="aspectFit"
            ></image>
            <view class="flex-column funcriceview" @tap="clickFuncButton(4)">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/guanzhu.png"
                    mode=""
                ></image>
                <text class="funcricetitle">我的关注</text>
            </view>

            <view class="flex-column funcriceview" @tap="clickwodelistBtn(4)">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/wodehuiyuan.png"
                ></image>
                <text class="funcricetitle">会员绑定</text>
            </view>

            <view class="flex-column funcriceview" @tap="clickwodelistBtn(5)" v-if="businesscooperation == 0">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/wodeyijianfankui.png"
                ></image>
                <text class="funcricetitle">当前版本</text>
            </view>
            <view class="flex-column funcriceview" @tap="clickwodelistBtn(6)" v-if="businesscooperation == 0">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/shangwuhezuoimg.png"
                ></image>
                <text class="funcricetitle">服务热线</text>
            </view>
            <view class="flex-column funcriceview" @tap="clickwodelistBtn(2)" v-if="businesscooperation == 1">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/wodeyijianfankui.png"
                ></image>
                <text class="funcricetitle">意见反馈</text>
            </view>
            <view class="flex-column funcriceview" @tap="clickwodelistBtn(3)" v-if="businesscooperation == 1">
                <image
                    class="funcriceiamge"
                    src="https://mcdn.chatgk.com/xcx/static/images/wode/shangwuhezuoimg.png"
                ></image>
                <text class="funcricetitle">商务合作</text>
            </view>
        </view>

        <!-- <image class="wodefuncview" src="https://mcdn.chatgk.com/xcx/static/images/wode/wode_item_bg.png"
			mode="aspectFit"></image> -->
        <!-- 邀请入口 -->
        <!-- <view class="yaoqingrukou" @tap.stop="linkPageWeb">
			<image src="https://mcdn.chatgk.com/xcx/static/images/wode/yaoqingimage.png" mode=""></image>
		</view> -->

        <view class="list-down">
            <view class="container-top">
                <text class="text-top-item" :class="selectIndex == 0 ? 'select' : ''" @tap="onClickTopItem(0)">
                    志愿表
                </text>
                <text class="text-top-item" :class="selectIndex == 1 ? 'select' : ''" @tap="onClickTopItem(1)">
                    选科
                </text>
                <text class="text-top-item" :class="selectIndex == 2 ? 'select' : ''" @tap="onClickTopItem(2)">
                    测评
                </text>
            </view>

            <!-- ==================================== 选科 ========================================-->
            <view class="bott" style="">
                <view class="content flex-column" v-if="selectIndex == 1 && nologin">
                    <view
                        class="view-scroll-cell flex-row center-row space-between align-center"
                        v-for="(item, index) in dataList"
                        :key="index"
                        @tap="tapXuanke(item.id)"
                    >
                        <view class="">
                            <view style="display: flex; align-items: center">
                                <text class="text-title">{{ item.name }}</text>
                                <text class="zytypeTip" v-if="item.fromType">{{ item.fromType }}</text>
                            </view>
                            <text class="text-value">{{ item.date }}</text>
                        </view>
                        <view>
                            <image
                                style="width: 52rpx; height: 52rpx; margin-right: 4rpx; margin-left: 8rpx"
                                src="https://mcdn.chatgk.com/xcx/static/images/home/home_daxue_more_img.png"
                                mode=""
                            ></image>
                        </view>
                    </view>
                    <view class="showbox" v-if="dataList?.length < 1">
                        <image
                            style="width: 228rpx; height: 228rpx"
                            src="https://mcdn.chatgk.com/xcx/static/images/zhinengtianbao/wushujutu.png"
                            mode=""
                        ></image>
                        <view class="showtext">您还没有生成过选科方案，快来模拟一下吧</view>
                        <view class="linkzhineng" @tap="linkpagezhiyuan1">添加选科</view>
                    </view>
                </view>

                <view class="" v-if="selectIndex == 2 && nologin">
                    <view class="ping-view flex-column">
                        <view
                            class="ping-item-view flex-row center-row space-between align-center"
                            v-for="(item, index) in pingdataList"
                            :key="index"
                            @tap="tapPingResult(item)"
                        >
                            <view class="ping-item-view1 flex-column">
                                <text class="ping-item-text1" style="font-size: 28rpx; font-weight: bold">
                                    专业定位测评
                                </text>
                                <text class="ping-item-text2">{{ item.date }}</text>
                            </view>
                            <image
                                style="width: 52rpx; height: 52rpx; margin-right: 4rpx; margin-left: 8rpx"
                                mode="aspectFill"
                                src="https://mcdn.chatgk.com/xcx/static/images/home/home_daxue_more_img.png"
                            />
                        </view>
                        <view class="showbox" v-if="pingdataList?.length < 1">
                            <image
                                style="width: 228rpx; height: 228rpx"
                                src="https://mcdn.chatgk.com/xcx/static/images/zhinengtianbao/wushujutu.png"
                                mode=""
                            ></image>
                            <view class="showtext">你还没有参与过测评，快来测试一下吧</view>
                            <view class="linkzhineng" @tap="linkpagezhiyuan2">参与测评</view>
                        </view>
                    </view>
                </view>
                <view class="" v-show="selectIndex == 0 && nologin">
                    <view class="flex-column">
                        <view class="item" v-for="(item, index) in volunteerList" :key="index">
                            <view
                                class="view-scroll-cell flex-row center-row space-between align-center"
                                @tap="onClickVolunteerCell(item, index)"
                            >
                                <view class="flex-column">
                                    <view
                                        class="text-title"
                                        style="display: flex; align-items: center"
                                        :class="item.status == 0 ? 'text-titles' : ''"
                                    >
                                        <view style="font-size: 28rpx; font-weight: bold">{{ item.title }}</view>
                                        <view
                                            class="text-value zytypeTip"
                                            :class="item.status == 0 ? 'text-values zytypeTips' : ''"
                                        >
                                            {{
                                                item.createFrom > 0
                                                    ? '专家填报'
                                                    : item.zyType == '1'
                                                    ? '自主填报'
                                                    : '一键填报'
                                            }}
                                        </view>
                                    </view>
                                    <text :class="item.status == 0 ? 'text-values' : ''" class="text-value">
                                        {{ item.family }}
                                    </text>
                                </view>
                                <view class="flex-row center-row align-center">
                                    <view class="flex-column center-row" style="align-items: center">
                                        <text
                                            :class="item.status == 0 ? 'text-titles' : 'text-title'"
                                            style="font-size: 36rpx"
                                        >
                                            {{ item.rate.replace('%', '') }}
                                            <text style="font-size: 24rpx; margin-left: -8rpx">%</text>
                                        </text>
                                        <text
                                            class="text-value"
                                            :class="item.status == 0 ? 'text-values' : 'text-title'"
                                        >
                                            靠谱率
                                        </text>
                                    </view>
                                    <image
                                        style="width: 52rpx; height: 52rpx; margin-right: 4rpx; margin-left: 8rpx"
                                        src="https://mcdn.chatgk.com/xcx/static/images/home/home_daxue_more_img.png"
                                        mode="aspectFit"
                                    ></image>
                                </view>
                            </view>
                        </view>
                        <view class="showbox" v-if="volunteerList?.length < 1">
                            <image
                                style="width: 228rpx; height: 228rpx"
                                src="https://mcdn.chatgk.com/xcx/static/images/zhinengtianbao/wushujutu.png"
                                mode=""
                            ></image>
                            <view class="showtext">您还没有生成过志愿表，快来模拟一下吧</view>
                            <view class="linkzhineng" @tap="linkpagezhiyuan">添加志愿表</view>
                        </view>
                    </view>
                </view>
                <view class="nologinShow" v-if="!nologin">
                    <view class="nologinShow-button">
                        <text style="font-size: 0.9rem; color: red" @tap="gotologin">登录/注册</text>
                    </view>
                    <text class="nologinShow-txt">登录/注册可查看账户信息</text>
                </view>
            </view>
        </view>
        <!-- 去登录弹窗 -->
        <centerPop
            :show.sync="centerPopShow"
            rightBtnText="去登录"
            @centerPopupClose="centerPopupClose"
            @centerPopupSubmit="centerPopupSubmit"
        >
            <template #default>
                <view class="centerPopBox">
                    <text class="text">请先登录再进行操作</text>
                    <image
                        class="image"
                        src="https://mcdn.chatgk.com/xcx/static/images/wode/headimageMan.png"
                        mode=""
                    ></image>
                </view>
            </template>
        </centerPop>
    </view>
</template>

<script>
import userManager from '@/common/manager/user-manager.js';
import centerPop from '@/components/A_cus/centerPop.vue';

export default {
    components: {
        centerPop
    },
    data() {
        return {
            centerPopShow: false, //控制临时用户点击显示去登录弹窗
            nowYear: 0,
            touxiang: '',
            gaokaoshow: false,
            isLoadingGk: false,
            isgaokao: 0,
            loadshow: false,
            nologin: true,
            pingdataList: [],
            volunteerList: [],
            area: 0,
            selectIndex: 0,
            dataList: [],
            queryData: [],
            qiniutoken: '',
            key: '',
            isShowAddrss: true,
            myheadImage: '',
            sex: 1, //1 男 0女
            userName: '',
            myAddress: '-',
            graduate_time: '-',
            myScore: '-',
            mySelectXuanKe: '',
            userInfo: undefined,
            xuankeData: {
                1: {
                    22: '文科',
                    11: '理科'
                },
                2: {
                    1: '物',
                    2: '化',
                    3: '生',
                    6: '政',
                    4: '历',
                    5: '地',
                    7: '技'
                },
                3: {
                    1: '物',
                    2: '化',
                    3: '生',
                    6: '政',
                    4: '历',
                    5: '地',
                    7: '技'
                }
            },
            statusHeight: uni.getSystemInfoSync().statusBarHeight,
            styleColorNum: 0, //导航变色
            styleColorNameNum: 0, //名字变色
            showWodeshezhi: false,
            businesscooperation: 0,
            storeInfo: JSON.parse(uni.getStorageSync('storeInfo'))
        };
    },
    onLoad() {
        let _this = this;
        // this.$request.judgeQuestionDescAPI().then((res) => {
        //     uni.setStorageSync('questionDesc', res.data);
        // });
        this.businesscooperation = _this.storeInfo.businesscooperation;
    },
    onPageScroll(e) {
        if (e.scrollTop < 0) {
            this.styleColorNum = 0;
            this.styleColorNameNum = 0;
            this.showWodeshezhi = false;
        } else if (e.scrollTop >= 0 && e.scrollTop < 101) {
            this.styleColorNum = e.scrollTop;
            this.styleColorNameNum = e.scrollTop;
            this.showWodeshezhi = false;
        } else {
            this.styleColorNum = 100;
            this.styleColorNameNum = 100;
            this.showWodeshezhi = true;
        }
    },
    onReady() {
        if (!uni.getStorageSync('isFirstLogin')) {
            this.$userManager.isLogin();
        }
    },
    onShow() {
        const date = new Date();
        this.nowYear = date.getFullYear();
        setTimeout(() => {
            this.isgaokao = uni.getStorageSync('isGKB');
            this.isLoadingGk = true;
        }, 1000);
        console.log('getApp().globalData.userInfo', getApp().globalData.userInfo);
        if (getApp().globalData.userInfo) {
            this.myheadImage = 'http://mcdn.chatgk.com' + getApp().globalData.userInfo.head;
            this.getJudgeResInfo();
            this.getprovinceInfo();
            this.nologin = true;
            this.getzyList();

            let userInfo = getApp().globalData.userInfo;

            // 获取历史登录缓存
            let userInfos = this.$userManager.getHistoryUserLoginInfo() || {};
            // let userInfos = uni.getStorageSync('userInfos') // 重新获取存储
            // 保存token
            userInfo.toKen = uni.getStorageSync('token');
            // 添加或修改当前登录历史信息
            userInfos[userInfo['phone']] = userInfo;
            // 保存本地缓存

            // uni.setStorageSync('userInfos', userInfos)
            this.$userManager.setHistoryUserLoginInfo(userInfos);
        } else {
            this.nologin = false;
            this.pingdataList = [];
            this.volunteerList = [];
            this.userName = '';
            this.myAddress = '';
            this.graduate_time = '';
        }
        const _this = this;
        uni.$on('refreshVolunteerList', function () {
            let data = {
                mod: 2,
                fronttype: 3,
                isStudentSee: 1
            };
            _this.$request.zyList(data).then((res) => {
                uni.hideLoading();
                _this.volunteerList = res.data;
            });
        });
        uni.$on('pingUpdate', this.pingUpdate);
        this.userInfo = getApp().globalData.userInfo;
        this.mySelectXuanKe = '';
        if (!this.userInfo) {
            this.sex = 1;
            this.isShowAddrss = true;
            this.userName = '登录/注册';
            this.myAddress = '-';
            this.myScore = '-';
            this.mySelectXuanKe = '-';
            this.myheadImage = '';
            this.graduate_time = '';
        } else {
            if (this.userInfo.head?.length == 0) {
                this.myheadImage = '';
            } else {
                this.myheadImage = 'http://mcdn.chatgk.com' + this.userInfo.head;
            }
            this.sex = this.userInfo.sex;
            this.isShowAddrss = false;
            this.userName = this.userInfo.nick;
            this.myAddress = this.userInfo.province;
            this.graduate_time = this.userInfo.graduate_time;
            if (this.userInfo.score?.length == 0) {
                this.myScore = '-';
            } else {
                this.myScore = this.userInfo.score;
            }
            if (this.userInfo.sgid?.length == 0) {
                this.mySelectXuanKe = '-';
            } else {
                var getsgid = String(this.userInfo.sgid);
                var sgidArr = getsgid.split(',');
                for (var i = 0; i < sgidArr?.length; i++) {
                    var xuankeDic = this.xuankeData[this.userInfo.xk_type];
                    this.mySelectXuanKe = this.mySelectXuanKe + xuankeDic[sgidArr[i]];
                }
            }
        }

        this.getAreaChildsAPI();
        if (getApp().globalData.userInfo) {
            // this.loadshow = true
            this.$request.selectResInfo().then((res) => {
                this.loadshow = false;
                this.dataList = res.data;
            });
        }
    },

    methods: {
        // 去登录弹窗
        centerPopupSubmit() {
            uni.navigateTo({
                url: '/pages/login/login-home',
                success: () => {
                    this.centerPopShow = false;
                }
            });
        },
        //取消
        centerPopupClose() {
            this.centerPopShow = false;
        },
        returnstryle(num) {
            return `background-color: rgba(255, 255, 255, ${num / 100});`;
        },
        returnstryleColor(num) {
            return `color: rgba(0, 0, 0, ${num / 100});`;
        },
        linkpagezhiyuan() {
            if (uni.getStorageSync('is_visitor') == 1) {
                this.centerPopShow = true;
            } else {
                uni.navigateTo({
                    url: '/subpackages/subpackage1/pages/zhinengtianbao/zhinengtianbao'
                });
            }
        },
        linkpagezhiyuan1() {
            if (uni.getStorageSync('is_visitor') == 1) {
                this.centerPopShow = true;
            } else {
                uni.navigateTo({
                    url: '/subpackages/subpackage1/pages/zhinengxuanke/zhinengxuanke'
                });
            }
        },
        linkpagezhiyuan2() {
            if (uni.getStorageSync('is_visitor') == 1) {
                this.centerPopShow = true;
            } else {
                uni.switchTab({
                    url: '/pages/tabBar/ping/ping'
                });
            }
        },
        getAreaChildsAPI() {
            this.$request
                .areaChildsAPI()
                .then((res) => {
                    uni.setStorageSync('newJsondata', res.data);
                })
                .catch((res) => {
                    uni.hideToast();
                });
        },
        linkPageWeb() {
            // this.$request.invitedNewPageAPI().then(res=>{
            // 	this. token = uni.getStorageSync("token")
            // 	this.urls=res.data.url_my
            // 	plus.runtime.openWeb(this.urls) //这里默认使用外部浏览器打开而不是内部web-view组件打开
            // })

            if (this.isNotLogin()) {
                return;
            }

            uni.navigateTo({
                url: './yaoqingWeb'
            });
        },
        navscore() {
            if (uni.getStorageSync('is_visitor') == 1) {
                this.centerPopShow = true;
            } else {
                if (this.isgaokao == 1) {
                    return;
                }
                uni.navigateTo({
                    url: '/subpackages/subpackage1/pages/score/home-score'
                });
            }
        },
        colse_gkb() {
            this.gaokaoshow = false;
        },
        gologin() {
            uni.navigateTo({
                url: '/pages/login/phone-login'
            });
        },
        //修改个人信息
        updateinfo() {
            uni.navigateTo({
                url: '/subpackages/subpackage1/pages/tabBar/wode/changeUserInfo'
            });
        },
        //获取志愿表地区
        getprovinceInfo() {
            const _this = this;
            const province = getApp().globalData.userInfo.province || '';
            this.loadshow = true;
            if (province?.length < 1) {
                return;
            }

            this.$request.provinceInfo().then((res) => {
                this.loadshow = false;
                const provinceData = res.data.find((item) => item.provinceName == province);
                _this.area = Number(provinceData.zy_type);
            });
        },
        onClickBack() {
            uni.navigateBack();
        },
        getzyList() {
            // uni.showLoading()
            this.loadshow = true;
            let data = {
                mod: 2,
                fronttype: 3,
                isStudentSee: 1
            };
            this.$request
                .zyList(data)
                .then((res) => {
                    this.loadshow = false;
                    // uni.hideLoading()
                    this.volunteerList = res.data;
                })
                .catch((err) => {
                    uni.hideLoading();
                });
        },
        onClickVolunteerCell(info, index) {
            if (info.status == 0) {
                return;
            }
            if (this.area == 1) {
                uni.setStorageSync('previewThree', info);
                uni.navigateTo({
                    // url: './volunteer-table-three?data=' + encodeURIComponent(JSON.stringify(info))
                    url: '/subpackages/subpackage1/pages/volunteer/volunteer-table-three'
                });
            } else if (this.area == 2) {
                uni.setStorageSync('previewTwo', info);
                uni.navigateTo({
                    // url: './volunteer-table-two?data=' + encodeURIComponent(JSON.stringify(info))
                    url: '/subpackages/subpackage1/pages/volunteer/volunteer-table-two'
                });
            } else if (this.area == 3) {
                uni.setStorageSync('previewOne', info);
                uni.navigateTo({
                    // url: './volunteer-table?data=' + encodeURIComponent(JSON.stringify({"isBackHome":false, "data":info, "index":index}))
                    url: '/subpackages/subpackage1/pages/volunteer/volunteer-table?isBackHome=false' + '&index=' + index
                });
            }
        },

        //查询测评信息
        getJudgeResInfo() {
            this.loadshow = true;
            this.$request.judgeResInfoAPI().then((res) => {
                this.loadshow = false;
                this.pingdataList = res.data;
            });
        },
        startPing() {
            if (this.$userManager.isLogin()) {
                // 填写信息
                const userInfo = getApp().globalData.userInfo;
                if (!userInfo.nick || !userInfo.pid || !userInfo.xk_type) {
                    uni.navigateTo({
                        url: '/subpackages/subpackage2/pages/login/perfect-info'
                    });
                    return;
                }

                uni.navigateTo({
                    url: '/pages/tabBar/ping/ping-question'
                });
            }
        },

        pingUpdate() {
            setTimeout(() => {
                this.pingdataList = userManager.getPingInfo();
            }, 150);
        },

        // tapPingResult(index) {
        // 	const pingResult = this.dataList[index];
        // 	uni.navigateTo({
        // 		url: '/subpackages/subpackage1/pages/tabBar/ping/ping-result?uuid=' + pingResult.uuid
        // 	});
        // },
        tapPingResult(index) {
            // const pingResult = this.dataList[index];
            this.loadshow = true;
            uni.setStorageSync('pingbaogaoid', index.id);
            this.$request
                .judgeResInfoAPI({
                    id: index.id
                })
                .then((res) => {
                    this.loadshow = false;
                    uni.setStorageSync('pingbaogaouuid', res.data.uuid);
                    uni.setStorageSync('pingbaogaouudata', JSON.stringify(res.data));
                    uni.navigateTo({
                        url:
                            '/subpackages/subpackage1/pages/tabBar/ping/ping-result?isfrom=2&uuid=' +
                            res.data.uuid +
                            '&data=' +
                            JSON.stringify(res.data) +
                            '&id=' +
                            index.id
                    });
                });
        },
        tapXuanke(index) {
            this.loadshow = true;
            this.$request
                .selectResInfo({
                    id: index
                })
                .then((res) => {
                    this.loadshow = false;
                    this.queryData = res.data;

					uni.navigateTo({
						url: `/subpackages/subpackage1/pages/zhinengxuanke/newXuankedetails?isAI=${
							this.queryData.fromType == '智能选科' ? 2 : 1
						}&id=${this.queryData.id}`,
						fail(err) {
							console.log(err);
						}
					});
				});
		},
		onClickTopItem(index) {
			(this.selFilterIndex = -1), (this.selectIndex = index);
			if (index == 0) {
				this.holder = '院校名称';
			} else if (index == 1) {
				this.holder = '专业名称';
			}
		},
		gotologin() {
			if (this.isNotLogin()) {
				return;
			}
		},
		selectHeadImage() {
			if (uni.getStorageSync('is_visitor') == 1) {
				this.centerPopShow = true;
			} else {
				if (this.isNotLogin()) {
					return;
				}
				uni.navigateTo({
					url: '/subpackages/subpackage1/pages/tabBar/wode/changeUserInfo'
				});
			}
		},
		// 点击查看VIP
		onClickGotoSeeVip() {
			if (uni.getStorageSync('is_visitor') == 1) {
				this.centerPopShow = true;
			} else {
				if (this.$userManager.isLogin()) {
					uni.switchTab({
						url: '/pages/tabBar/wode/vip-details-copy'
					});
				}
			}
		},

        clickFuncButton(e) {
            if (uni.getStorageSync('is_visitor') == 1 && e == 4) {
                this.centerPopShow = true;
            } else {
                if (this.isNotLogin()) {
                    return;
                }
                if (e == 1) {
                    uni.navigateTo({
                        url: '/subpackages/subpackage1/pages/volunteer/volunteer-list'
                    });
                }
                if (e == 2) {
                    uni.navigateTo({
                        url: '/pages/tabBar/wode/myPingList'
                    });
                }
                if (e == 3) {
                    // pages/zhinengxuanke/xuankesave
                    uni.navigateTo({
                        url: '/subpackages/subpackage1/pages/zhinengxuanke/xuankesave'
                    });
                }
                if (e == 4) {
                    uni.navigateTo({
                        url: '/pages/tabBar/wode/myAttention'
                    });
                }
            }
        },
        isNotLogin() {
            if (!this.userInfo) {
                uni.navigateTo({
                    url: '/pages/login/login-home'
                });
                return true;
            }
            return false;
        },
        clickEditMyScore() {
            if (this.isNotLogin()) {
                return;
            }
            uni.navigateTo({
                url: '/subpackages/subpackage1/pages/score/home-score' //?data=' + JSON.stringify({"pid":this.userInfo.pid, "province":this.userInfo.province, "type":this.userInfo.xk_type, "grade":this.userInfo.grade, "score":this.userInfo.score, "sgid":this.userInfo.sgid})
            });
        },
        clickwodelistBtn(e) {
            if (uni.getStorageSync('is_visitor') == 1 && e == 4) {
                this.centerPopShow = true;
            } else {
                if (this.isNotLogin()) {
                    return;
                }
                if (e == 4) {
                    uni.navigateTo({
                        url: '/pages/login/binding-card'
                    });
                }
                if (e == 1) {
                    uni.navigateTo({
                        url: '/pages/tabBar/wode/wodeSetting'
                    });
                }
                if (e == 2) {
                    uni.navigateTo({
                        url: '/pages/tabBar/wode/feedback'
                    });
                }
                if (e == 3) {
                    uni.navigateTo({
                        url: '/pages/tabBar/wode/shangwuhezuo'
                    });
                }
                if (e == 5) {
                    uni.navigateTo({
                        url: '/subpackages/subpackage1/pages/tabBar/wode/aboutus'
                    });
                }
                if (e == 6) {
                    uni.navigateTo({
                        url: '/subpackages/subpackage1/pages/tabBar/wode/fuwurexian/fuwurexian'
                    });
                }
            }
        }
    }
};
</script>

<style lang="scss" scoped>
.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.space-between {
    display: flex;
    justify-content: space-between;
}

.status_bar {
    height: var(--status-bar-height);
    width: 100%;
}

.nav_bar {
    height: 88rpx;
    width: 100%;
}

.nav_back_btn {
    width: 100rpx;
    height: 60rpx;
}

.nav_title {
    width: 100%;
    color: #fff;
    font-size: 32rpx;
    font-weight: 600;
    text-align: center;
    margin-right: 90rpx;
}

.image-top {
    position: fixed;
    width: 100%;
    height: 578rpx;
    z-index: 0;
}

.scroll-view {
    margin-top: calc(578rpx - var(--window-top) - var(--status-bar-height) - 88rpx);
    height: calc(100% - 578rpx - env(safe-area-inset-bottom));
    width: 100%;
}

.view-scroll-cell {
    margin: 0 32rpx 16rpx 32rpx;
    padding: 24rpx 8rpx 24rpx 24rpx;
    background-color: #fcfcfc;
    border-radius: 16rpx;
}

.text-value {
    color: #333333;
    font-size: 24rpx;
    font-weight: bold;
    margin-top: 8rpx;
}

.text-values {
    color: #cccccc;
}

.text-title {
    color: #333333;
    font-size: 28rpx;
    font-weight: bold;
}

.text-titles {
    color: #cccccc;
    font-size: 28rpx;
    font-weight: bold;
}

.ping-view {
    background-color: #0000;
    width: 100%;
    /* height: 100%; */
    /* padding: 60rpx 32rpx 0 32rpx; */
}

/* 背景 */
.ping-bg-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.ping-bg-img {
    width: 100%;
    height: 100%;
}

/* 评测 */
.ping-mian-view {
    margin: 60rpx 32rpx 40rpx 32rpx;
    height: 360rpx;
}

.ping-mian-1-text {
    margin: 72rpx 0 0 72rpx;
    color: #fff;
    font-size: 32rpx;
    font-family: PingFangSC-Semibold;
    font-weight: 600;
}

.ping-mian-2-text {
    margin: 20rpx 0 0 72rpx;
    color: #fff;
    font-size: 24rpx;
    font-family: PingFangSC-Semibold;
    font-weight: 600;
}

.ping-mian-3-view {
    margin: 44rpx 0 0 72rpx;
    width: 172rpx;
    height: 60rpx;
    border-radius: 30rpx;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.ping-mian-3-text {
    color: #464646;
    font-size: 24rpx;
    font-family: PingFangSC-Semibold;
    font-weight: 600;
}

/* item */
.ping-user-text {
    margin: 24rpx 0rpx 20rpx 32rpx;
    color: #333333;
    font-size: 32rpx;
    font-weight: bold;
}

.ping-item-view {
    margin: 20rpx 32rpx 20rpx 32rpx;
    height: 134rpx;
    border-radius: 20rpx;
    justify-content: space-between;
    align-items: center;
    background-color: #fcfcfc;
}

.ping-item-view1 {
    margin-left: 36rpx;
}

.ping-item-text1 {
    color: #333333;
    font-size: 30rpx;
    font-weight: bold;
}

.ping-item-text2 {
    margin-top: 4rpx;
    color: #999999;
    font-size: 24rpx;
    font-weight: bold;
}

.ping-mian-more-img {
    margin-right: 32rpx;
    width: 16rpx;
    height: 24rpx;
}

.content {
    /* height: 100vh; */
    background: #ffffff;
}

.save-item-view {
    margin: 20rpx 32rpx 0rpx 32rpx;
    height: 140rpx;
    border-radius: 20rpx;
    /* align-items: center; */
    justify-content: center;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-item-text {
    margin-left: 48rpx;
    color: #464646;
    font-size: 28rpx;
    font-weight: bold;
}

.bott {
    /* background-color: aqua; */
    width: 100%;
    /* overflow-y: scroll; */
}

.bott .showbox {
    height: 320rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 20rpx auto;
}

.bott .showbox .showtext {
    width: 100%;
    height: 40rpx;
    font-size: 28rpx;
    text-align: center;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #999999;
    margin-bottom: 20rpx;
}

.text-top-item {
    color: #464646;
    font-size: 36rpx;
    line-height: 80rpx;
    background-color: #fff;
    width: 100%;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box;
}

.text-top-item.select {
    color: #ff3b0a;
}

.list-down {
    background: #ffffff;
    margin: 32rpx;
    border-radius: 16rpx;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.no-login {
    display: flex;
    flex-direction: column;
    margin: auto 0;
    margin-left: 36rpx;

    .no-login-1 {
        font-size: 44rpx;
        font-weight: 400;
    }

    .no-login-2 {
        font-size: 24rpx;
        font-weight: 400;
        margin-top: 8rpx;
    }
}

.container-top {
    display: flex;
    height: 110rpx;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border-top-left-radius: 16rpx;
    border-top-right-radius: 16rpx;
}

.wodecontentbgview {
    background-color: #f8f8f8;
    /* min-height: 100vh; */
}

.wodeheadview {
    /* background-color: white; */
    z-index: 100;
    position: relative;
    align-items: center;
}

.wodeheadimage-background {
    width: 124rpx;
    height: 124rpx;
    border-radius: 60rpx;
    margin: 46rpx 16rpx 40rpx 28rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    position: relative;

    .icon_wode_vip {
        width: 48rpx;
        height: 40rpx;
        // margin: 80rpx 0 0 -60rpx;
        position: absolute;
        bottom: 0;
        right: 0;
    }
}

.wodeheadimage {
    /* margin: 46rpx 16rpx 40rpx 32rpx; */
    width: 120rpx;
    height: 120rpx;
    border-radius: 60rpx;
}

.wodenametitle {
    font-size: 32rpx;
    margin-top: 10rpx;
    height: 60rpx;
    line-height: 60rpx;
    margin-left: 12rpx;
    color: #464646;
    font-weight: bold;
}

.wodenameimage {
    width: 20rpx;
    height: 20rpx;
    /* background-color: aqua; */
    margin-left: 10rpx;
    margin-top: 10rpx;
}

.wodeareaimage {
    width: 30rpx;
    height: 30rpx;
    margin-left: 12rpx;
    margin-top: 0;
}

.wodeareatitle {
    font-size: 25rpx;
    margin-top: 0;

    margin-left: 12rpx;
    padding: 5rpx 16rpx;
    /* background-color: rgba(202, 201, 195, 0.5); */
    background-color: #ff9f6e;
    border-radius: 10rpx;
    color: #ffffff;
}

.wodegkYeartitle {
    font-size: 25rpx;
    /* margin-top: 0; */

    border-radius: 22rpx;
    padding: 5rpx 16rpx;
    /* background-color: rgba(202, 201, 195, 0.5); */
    background-color: #ff9f6e;
    border-radius: 10rpx;
    margin-left: 22rpx;
    color: #ffffff;
    /* background-color: #EAEAEA; */

    text-align: center;
}

.wodefuncview {
    margin: 0 32rpx;
    height: 204rpx;
    position: relative;

    .wodefuncview-img {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100%;
    }
}

.funcriceview {
    height: 160rpx;
    width: calc((100vw - 64rpx - 50rpx) / 4);
    margin-left: 10rpx;
    margin-top: 30rpx;
    background-color: transparent;
    align-items: center;
    z-index: 10;
}

.funcriceiamge {
    margin-top: 34rpx;
    width: 72rpx;
    height: 72rpx;
}

.funcricetitle {
    height: 40rpx;
    line-height: 40rpx;
    font-size: 24rpx;
    color: #464646;
}

.wodecenterimage {
    margin-top: 32rpx;
    margin-left: 32rpx;
    height: 152rpx;
    width: 686rpx;
    /* border-radius: 76rpx; */
}

.myscoreview {
    margin-top: 29rpx;
    margin-left: 29rpx;
    height: 130rpx;
    width: 692rpx;
    border-radius: 20rpx;
    background-color: white;
}

.myscoretitle {
    margin-left: 52rpx;
    height: 130rpx;
    line-height: 130rpx;
    font-size: 32rpx;
    color: #464646;
    font-weight: bold;
}

.scoretitle {
    margin-left: 20rpx;
    height: 130rpx;
    font-size: 32rpx;
    color: #464646;
    line-height: 130rpx;
    font-weight: bold;
}

.kemutitle {
    margin-left: 20rpx;
    height: 130rpx;
    line-height: 130rpx;
    font-weight: bold;
    font-size: 32rpx;
    color: #464646;
}

.text-score {
    margin-top: 10rpx;
    margin-left: 10rpx;
    /* padding-left: 50rpx; */
    /* height: 130rpx; */
    /* line-height: 130rpx; */
    /* font-weight: bold; */
    font-size: 26rpx;
    color: #464646;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.editscoreimage {
    width: 30rpx;
    height: 32rpx;
    /* background-color: red; */
    margin-left: 20rpx;
    /* margin-top: ; */
    margin-bottom: -5rpx;
}

.showscoreimage {
    width: 176rpx;
    height: 108rpx;
    /* background-color: red; */
    margin-top: 15rpx;
    margin-left: 20rpx;
}

.listContentView {
    margin: 32rpx 32rpx 32rpx 32rpx;
    padding: 12rpx 0 12rpx 0;
    border-radius: 20rpx;
    background-color: white;
}

.limitContentView {
    height: 100rpx;
    align-items: center;
}

.listImageIcon {
    position: absolute;
    right: 32rpx;
    bottom: 30rpx;
    width: 60rpx;
    height: 60rpx;
}

.listImageIcon-2 {
    // margin: 20rpx 16rpx 20rpx 170rpx;
    padding: 30rpx 0;
    margin-right: 10rpx;
    width: 60rpx;
    height: 60rpx;
}

.listTitle {
    font-size: 28rpx;
    color: #464646;
    font-weight: bold;
}

.view-vip-bg {
    background-image: url('https://mcdn.chatgk.com/xcx/static/images/wode/VIPbg.png');
    background-size: 100% 100%;
    border-radius: 16rpx;
    /* width: 668rpx; */
    margin: 0 42rpx -25rpx;
    height: 164rpx;
    padding: 0 24rpx 10rpx 32rpx;
    z-index: 1;
}

.view-vip-bg2 {
    background-image: url('https://mcdn.chatgk.com/xcx/static/images/wode/VIPbg2.png');
}

.view-vip-line {
    width: 2rpx;
    height: 32rpx;
    background-color: #fff;
    margin: 0 16rpx;
}

.text-vip-28 {
    color: #fff;
    font-size: 28rpx;
    font-weight: bold;
    margin: 24rpx 0rpx 12rpx 0rpx;
}

.text-vip-24 {
    color: #fff;
    font-size: 24rpx;
    font-weight: bold;
}

.yaoqingrukou {
    width: 90%;
    height: 200rpx;
    margin: auto;
    position: relative;
    top: -160rpx;
    z-index: 2;
}

.yaoqingrukou image {
    width: 100%;
    height: 100%;
}

.linkzhineng {
    width: 200rpx;
    height: 60rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    color: red;
    font-size: 28rpx;
    border: 1rpx solid red;
    border-radius: 30rpx;
}

.header {
    width: 100vw;
    background-image: url('https://mcdn.chatgk.com/xcx/static/images/wode/header-background-image.png');
    background-repeat: round;
}

.fiexdheader {
    width: 100vw;
    position: fixed;
    top: 0;
    padding-top: 100rpx;
    z-index: 9;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
}

.zytypeTip {
    font-size: 16rpx;
    border: 1rpx solid #999999;
    border-radius: 6rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rpx 8rpx;
    margin-top: 0;
    margin-left: 20rpx;
}

.zytypeTips {
    border: 1rpx solid #cccccc;
}

.positionBox {
    /* float: right;
        margin-left: 350rpx; */
    /* margin-top: calc(60rpx + var(--status-bar-height)); */
    margin-right: 32rpx;
}

.nologinShow {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 120rpx;

    .nologinShow-button {
        border: 1px solid red;
        width: 100px;
        border-radius: 25px;
        text-align: center;
        margin-bottom: 10px;
        height: 30px;
        line-height: 30px;
        margin: 0 auto;
    }

    .nologinShow-txt {
        margin-top: 20rpx;
        font-size: 24rpx;
        color: #999999;
    }
}
</style>